<?php

namespace app\exam\model;

use think\Model;

class Exam extends Model
{
    //商品主表
    protected $table = 'exam';

    //添加入库
    public static function add($data)
    {
        return self::create($data, true);
    }

    // 列表展示
    public static function index()
    {
        return self::order("good_stock desc")->paginate(5);
    }

    //修改状态
    public static function upd($data)
    {
        return self::update($data, ['id' => $data['id']], true);
    }
}
